package com.auxgroup.hr.front.dao.repository;
import java.math.BigDecimal;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.auxgroup.hr.front.dao.domain.PsCWfFileAtt;
import com.auxgroup.hr.front.dao.domain.PsCWfFileAttPrimary;

/**
 * @author lv-PC
 *
 */
@Repository
public interface PsCWfFileAttRepository extends
JpaRepository<PsCWfFileAtt,PsCWfFileAttPrimary>,JpaSpecificationExecutor<PsCWfFileAtt> {
	
	
	@Query("select max(seqnbr) from PsCWfFileAtt u where u.cTransactionNbr=:cTransactionNbr and u.cStepNbr=:cStepNbr and u.cUserNbr=:cUserNbr")
	public BigDecimal getMaxSeqNbr(@Param("cTransactionNbr") String cTransactionNbr,@Param("cStepNbr") BigDecimal cStepNbr,@Param("cUserNbr") BigDecimal cUserNbr);
}